#include <iostream>
#include <string>
using namespace std;


int main(){
	int p1,p2,p3;
	cin>>p1>>p2>>p3;
	string s,t;
	cin>>s;
	t = "";
	for(int i=0;i<s.length();i++){
		if(i == 0  ||  i == s.length()-1){
			t += s[i];
			continue;
		}
		if(i == 0  ||  i == s.length()-1  ||s[i] != '-'  ||  s[i-1] >= s[i+1]  ||  (s[i-1] < 97  &&  s[i+1] >= 97)  ||  s[i-1] == '-'  || s[i+1] == '-'){
			t += s[i];
			continue;
		}
		string x="";
		for(int j=s[i-1]+1;j<s[i+1];j++){
			string c="";
			int l=j;
			if(p1 == 2){
				if(l >= 97)
					l = l-'a'+'A';
			}
			else if(p1 == 3){
				l = '*';
			}
			
			c += (char)l;
			string d=c;
			c = "";
			for(int i=0;i<p2;i++)
				c += d;
			if(p3 == 2)
				x = c+x;
			else
				x = x+c;
		}
		t += x;
	}
	cout<<t;
}
